﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Linq;
using System.Threading.Tasks;
using System.Windows.Forms;
using DevExpress.XtraEditors;
using BUS;
using Public;

namespace QuanLyKhoHangVatTu
{
    public partial class ChiTietNhapKho : DevExpress.XtraEditors.XtraForm
    {
        NhapKho_BUS nk_bus = new NhapKho_BUS();
        NhapKho_PB nk_pn = new NhapKho_PB();

        public ChiTietNhapKho()
        {
            InitializeComponent();
        }

        private void xtraTabPage3_Paint(object sender, PaintEventArgs e)
        {

        }

        private void xtraTabPage1_Paint(object sender, PaintEventArgs e)
        {

        }

        private void ChiTietNhapKho_Load(object sender, EventArgs e)
        {
            gridNhapKho.DataSource = nk_bus.LayDSPhieuNhap();
        }

        private void gridView1_FocusedRowChanged(object sender, DevExpress.XtraGrid.Views.Base.FocusedRowChangedEventArgs e)
        {
            string ma = NhapKho_PB.MaPhieuNhap = gridView1.GetRowCellValue(gridView1.FocusedRowHandle, "MAPHIEUNHAP").ToString();
            gridChiTietNhap.DataSource = nk_bus.TimMaPhieuNhap(ma);
        }
    }
}